package com.relytosoft.mizar.analyze.structure.api.entity;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.relytosoft.dubhe.common.core.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

/**
 * @Author: zyc
 * @version: v1.0
 * @Date: 2022/5/12 17:18
 */
@TableName("AY_STRUCTURE_TASK_SON")
@ApiModel("AyStructureTaskSon")
public class AyStructureTaskSon extends BaseEntity {

    private static final long serialVersionUID = 1L;


    /**
     * 主键
     */
    @ApiModelProperty(value = "主键", required = true)
    @TableId(value = "ID", type = IdType.AUTO)
    @NotNull(message = "主键不能为空")
    private Integer id;

    /**
     * 主任务ID
     */
    @ApiModelProperty(value = "主任务ID", required = true)
    @TableField("STRUCTURE_TASK_ID")
    @NotNull(message = "主任务ID不能为空")
    private Integer structureTaskId;

    /**
     * 子任务ID;对应业务引擎返回的taskId
     */
    @ApiModelProperty(value = "子任务ID;对应业务引擎返回的taskId")
    @TableField("TASK_ID")
    private String taskId;

    /**
     * 设备ID
     */
    @ApiModelProperty(value = "设备ID", required = true)
    @TableField("CAMERA_ID")
    @NotBlank(message = "设备ID不能为空")
    private String cameraId;

    /**
     * 设备名称
     */
    @ApiModelProperty(value = "设备名称", required = true)
    @TableField("CAMERA_NAME")
    @NotBlank(message = "设备名称不能为空")
    private String cameraName;

    /**
     * 任务类型;1：实时任务，2：离线视频任务，3：离线文件任务
     */
    @ApiModelProperty(value = "任务类型;1：实时任务，2：离线视频任务，3：离线文件任务")
    @TableField("TYPE")
    private Integer type;

    /**
     * 占用资源（路）
     */
    @ApiModelProperty(value = "占用资源（路）")
    @TableField("LICENCE_USING")
    private Integer licenceUsing;

    /**
     * 任务开始时间;(实时任务、离线视频任务)
     */
    @ApiModelProperty(value = "任务开始时间;(实时任务、离线视频任务)")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField("BEGIN_TIME")
    private LocalDateTime beginTime;

    /**
     * 任务结束时间;(实时任务、离线视频任务)
     */
    @ApiModelProperty(value = "任务结束时间;(实时任务、离线视频任务)")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField("END_TIME")
    private LocalDateTime endTime;

    /**
     * 视频处理总时长
     */
    @ApiModelProperty(value = "视频处理总时长")
    @TableField("HANDLE_TOTAL_TIME")
    private String handleTotalTime;

    /**
     * 行人处理结果
     */
    @ApiModelProperty(value = "行人处理结果")
    @TableField("PEOPLE")
    private Integer people;

    /**
     * 机动车处理结果
     */
    @ApiModelProperty(value = "机动车处理结果")
    @TableField("VEHICLE")
    private Integer vehicle;

    /**
     * 非机动车处理结果
     */
    @ApiModelProperty(value = "非机动车处理结果")
    @TableField("NON_VEHICLE")
    private Integer nonVehicle;

    /**
     * 进程数，即录像视频对应的拆分数
     */
    @ApiModelProperty(value = "进程数，即录像视频对应的拆分数")
    @TableField("PROGRESS")
    private Integer progress;

    /**
     * rtsp或rtmp地址
     */
    @ApiModelProperty(value = "rtsp或rtmp地址")
    @TableField("VIDEO_URL")
    private String videoUrl;

    /**
     * 状态 -1-未启动，0--创建中,1-运行中，2-已结束，3-异常
     */
    @ApiModelProperty(value = "状态;-1-未启动，0--创建中,1-运行中，2-已结束，3-异常", required = true)
    @TableField("STATUS")
    @NotNull(message = "状态不能为空")
    private Integer status;

    /**
     * 删除标记;0：否，1：是
     */
    @ApiModelProperty(value = "删除标记;0：否，1：是")
    @TableField("IS_DELETED")
    private Integer isDeleted;

    /**
     * 任务状态异常原因
     */
    @ApiModelProperty(value = "任务状态异常原因")
    @TableField("ERROR_REASON")
    private String errorReason;

    /**
     * 备注
     */
    @ApiModelProperty(value = "备注")
    @TableField("REMARK")
    private String remark;

    /**
     * 任务名称
     */
    @ApiModelProperty(value = "任务名称", required = true)
    @TableField("TASK_NAME")
    @NotBlank(message = "任务名称不能为空")
    private String taskName;

    public String getTaskName() {
        return taskName;
    }

    public void setTaskName(String taskName) {
        this.taskName = taskName;
    }

    /**
     * 获得主键
     */
    public Integer getId() {
        return this.id;
    }

    /**
     * 设置主键
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * 获得主任务ID
     */
    public Integer getStructureTaskId() {
        return this.structureTaskId;
    }

    /**
     * 设置主任务ID
     */
    public void setStructureTaskId(Integer structureTaskId) {
        this.structureTaskId = structureTaskId;
    }

    /**
     * 获得子任务ID;对应业务引擎返回的taskId
     */
    public String getTaskId() {
        return this.taskId;
    }

    /**
     * 设置子任务ID;对应业务引擎返回的taskId
     */
    public void setTaskId(String taskId) {
        this.taskId = taskId;
    }

    /**
     * 获得设备ID
     */
    public String getCameraId() {
        return this.cameraId;
    }

    /**
     * 设置设备ID
     */
    public void setCameraId(String cameraId) {
        this.cameraId = cameraId;
    }

    /**
     * 获得设备名称
     */
    public String getCameraName() {
        return this.cameraName;
    }

    /**
     * 设置设备名称
     */
    public void setCameraName(String cameraName) {
        this.cameraName = cameraName;
    }

    /**
     * 获得任务类型;1：实时任务，2：离线视频任务，3：离线文件任务
     */
    public Integer getType() {
        return this.type;
    }

    /**
     * 设置任务类型;1：实时任务，2：离线视频任务，3：离线文件任务
     */
    public void setType(Integer type) {
        this.type = type;
    }

    /**
     * 获得占用资源（路）
     */
    public Integer getLicenceUsing() {
        return this.licenceUsing;
    }

    /**
     * 设置占用资源（路）
     */
    public void setLicenceUsing(Integer licenceUsing) {
        this.licenceUsing = licenceUsing;
    }

    /**
     * 获得任务开始时间;(实时任务、离线视频任务)
     */
    public LocalDateTime getBeginTime() {
        return this.beginTime;
    }

    /**
     * 设置任务开始时间;(实时任务、离线视频任务)
     */
    public void setBeginTime(LocalDateTime beginTime) {
        this.beginTime = beginTime;
    }

    /**
     * 获得任务结束时间;(实时任务、离线视频任务)
     */
    public LocalDateTime getEndTime() {
        return this.endTime;
    }

    /**
     * 设置任务结束时间;(实时任务、离线视频任务)
     */
    public void setEndTime(LocalDateTime endTime) {
        this.endTime = endTime;
    }

    /**
     * 获得视频处理总时长
     */
    public String getHandleTotalTime() {
        return this.handleTotalTime;
    }

    /**
     * 设置视频处理总时长
     */
    public void setHandleTotalTime(String handleTotalTime) {
        this.handleTotalTime = handleTotalTime;
    }

    /**
     * 获得行人处理结果
     */
    public Integer getPeople() {
        return this.people;
    }

    /**
     * 设置行人处理结果
     */
    public void setPeople(Integer people) {
        this.people = people;
    }

    /**
     * 获得机动车处理结果
     */
    public Integer getVehicle() {
        return this.vehicle;
    }

    /**
     * 设置机动车处理结果
     */
    public void setVehicle(Integer vehicle) {
        this.vehicle = vehicle;
    }

    /**
     * 获得非机动车处理结果
     */
    public Integer getNonVehicle() {
        return this.nonVehicle;
    }

    /**
     * 设置非机动车处理结果
     */
    public void setNonVehicle(Integer nonVehicle) {
        this.nonVehicle = nonVehicle;
    }

    /**
     * 获得进程数，即录像视频对应的拆分数
     */
    public Integer getProgress() {
        return this.progress;
    }

    /**
     * 设置进程数，即录像视频对应的拆分数
     */
    public void setProgress(Integer progress) {
        this.progress = progress;
    }

    /**
     * 获得rtsp或rtmp地址
     */
    public String getVideoUrl() {
        return this.videoUrl;
    }

    /**
     * 设置rtsp或rtmp地址
     */
    public void setVideoUrl(String videoUrl) {
        this.videoUrl = videoUrl;
    }

    /**
     * 获得状态
     */
    public Integer getStatus() {
        return this.status;
    }

    /**
     * 设置状态
     */
    public void setStatus(Integer status) {
        this.status = status;
    }

    /**
     * 获得删除标记;0：否，1：是
     */
    public Integer getIsDeleted() {
        return this.isDeleted;
    }

    /**
     * 设置删除标记;0：否，1：是
     */
    public void setIsDeleted(Integer isDeleted) {
        this.isDeleted = isDeleted;
    }

    /**
     * 获得任务状态异常原因
     */
    public String getErrorReason() {
        return this.errorReason;
    }

    /**
     * 设置任务状态异常原因
     */
    public void setErrorReason(String errorReason) {
        this.errorReason = errorReason;
    }

    /**
     * 获得备注
     */
    public String getRemark() {
        return this.remark;
    }

    /**
     * 设置备注
     */
    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Override
    public String toString() {
        return "AyStructureTaskSon{id=" + id +
                ",structureTaskId=" + structureTaskId +
                ",taskId=" + taskId +
                ",cameraId=" + cameraId +
                ",cameraName=" + cameraName +
                ",type=" + type +
                ",licenceUsing=" + licenceUsing +
                ",beginTime=" + beginTime +
                ",endTime=" + endTime +
                ",handleTotalTime=" + handleTotalTime +
                ",people=" + people +
                ",vehicle=" + vehicle +
                ",nonVehicle=" + nonVehicle +
                ",progress=" + progress +
                ",videoUrl=" + videoUrl +
                ",status=" + status +
                ",isDeleted=" + isDeleted +
                ",errorReason=" + errorReason +
                ",remark=" + remark +
                ",createdId=" + createdId +
                ",createdBy=" + createdBy +
                ",createdTime=" + createdTime +
                ",updatedId=" + updatedId +
                ",updatedBy=" + updatedBy +
                ",updatedTime=" + updatedTime +
                ",taskName=" + taskName +
                "}";
    }
}
